package com.example.springboot01;

import com.zds.payment.client.PaymentClient;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

@SpringBootApplication
@MapperScan("com.example.springboot01.mapper")
@EnableTransactionManagement
@Component
public class Springboot01Application {


    @Resource
    private PaymentClient client;

    @PostConstruct
    public void init(){
        client.pay();
    }

    public static void main(String[] args) {
        SpringApplication.run(Springboot01Application.class, args);
    }

}
